import axios from "./axios";
// 加入购物车
export function addcart(data) {
    return axios({
        url: '/cart/add',
        method: 'post',
        data
    });
}
// 查看购物车
export function watchcart(data) {
    return axios({
        url: '/cart/list',
        method: 'post',
        data
    });
}
// 获取推荐列表
export function getlist(data) {
    return axios({
        url: '/pro/recommendlist',
        method: 'get',
        params: data
    });
}
//更新全选选中状态
export function checkallfn(data) {
    return axios({
        url: '/cart/selectall',
        method: 'post',
        data
    });
}
// 更新当前选中状态
export function checkfn(data) {
    return axios({
        url: '/cart/selectone',
        method: 'post',
        data
    });
}
// 更新购物车数量
export function cartnumfn(data) {
    return axios({
        url: '/cart/updatenum',
        method: 'post',
        data
    });
}
// 删除购物车
export function delcart(data) {
    return axios({
        url: '/cart/remove',
        method: 'post',
        data
    });
}
